package top.blackr.folivora.common.security.crud.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = true)
public class SysMenu extends Model<SysMenu> {

    @Serial
    private static final long serialVersionUID = -8349500575446936731L;

    @TableId
    private Integer menuId;
    @Schema(description = "菜单/按钮名称")
    private String name;
    @Schema(description = "权限标识")
    private String permission;
    @Schema(description = "菜单路径")
    private String path;
    @Schema(description = "父级id")
    private Integer parentId;
    @Schema(description = "图标")
    private String icon;
    @Schema(description = "排序")
    private Integer sort;
    @Schema(description = "类型：1菜单；2按钮；3页面；4弹框")
    private String type;
    @Schema(description = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    @Schema(description = "删除标记")
    @TableField(value = "del_flag",fill = FieldFill.INSERT)
    private String delFlag;

}
